package com.example.springboottest.student.rs.impl;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

import com.example.springboottest.student.model.Student;
import com.example.springboottest.student.rs.StuRSService;
import com.example.springboottest.student.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;



@Service("stuRSService")
@Consumes(MediaType.APPLICATION_JSON) // RS服务标注
@Produces(MediaType.APPLICATION_JSON) // RS服务标注
public class StuRSServiceImpl implements StuRSService {

    @Autowired
    @Qualifier("stuMybatisService")
    private StuService stuService;

    // 获取json
    @Override
    public Student getStudent(@RequestParam(name = "id") String id) {
        return stuService.doFindById(id);
    }
}
